import { defineStore } from "pinia";
import type { typeThemeMode, typeColor } from "../types/theme";

export default defineStore("theme", {
    state: () => ({
        mode: "light" as typeThemeMode,
        color: "" as typeColor,
    }),
    actions: {
        setMode(value: typeThemeMode) {
            this.mode = value;
        },
        setColor(value: typeColor) {
            this.color = value;
        },
    },
    getters: {
        getMode: (state) => state.mode,
        getColor: (state) => state.color,
    },
});
